using UnityEngine;

namespace CinemaDirector
{
	[CutsceneItem("GG-Action", "SetTextEvent")]
	public class SetTextEvent : CinemaActorEvent
	{
		public GGVString text = new GGVString();

		public override void Trigger(GameObject actor)
		{
			text.Init(base.Cutscene.variables);
			UILabel component = actor.GetComponent<UILabel>();
			if (!(component == null) && !text.isCurrent)
			{
				component.text = text.value.stringValue;
			}
		}
	}
}
